LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := seetanet-prebuilt
LOCAL_SRC_FILES := $(LOCAL_PATH)/../../SeetaNet/libs/$(TARGET_ARCH_ABI)/libseetanet2.so
#LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := facedetector-prebuilt
LOCAL_SRC_FILES := $(LOCAL_PATH)/../../FaceDetector/libs/$(TARGET_ARCH_ABI)/libSeetaFaceDetector2.so
#LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := facerecognizer-prebuilt
LOCAL_SRC_FILES := $(LOCAL_PATH)/../../FaceRecognizer/libs/$(TARGET_ARCH_ABI)/libSeetaFaceRecognizer2.so
#LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/
include $(PREBUILT_SHARED_LIBRARY)

include $(CLEAR_VARS)
LOCAL_MODULE := facelandmarker-prebuilt
LOCAL_SRC_FILES := $(LOCAL_PATH)/../../FaceLandmarker/libs/$(TARGET_ARCH_ABI)/libSeetaFaceLandmarker2.so
#LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/
include $(PREBUILT_SHARED_LIBRARY)

#include $(CLEAR_VARS)
#LOCAL_MODULE := qualityassessor-prebuilt
#LOCAL_SRC_FILES := $(LOCAL_PATH)/../../QualityAssessor/libs/$(TARGET_ARCH_ABI)/libSeetaQualityAssessor2.so
#LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include/
#include $(PREBUILT_SHARED_LIBRARY)


include $(CLEAR_VARS)

LOCAL_MODULE := SeetaFaceJNI

MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/../src/*.cpp)
MY_CPP_LIST += $(wildcard $(LOCAL_PATH)/../src/seeta/*.cpp)


LOCAL_SRC_FILES := $(MY_CPP_LIST:$(LOCAL_PATH)/%=%)

LOCAL_C_INCLUDES += $(LOCAL_PATH)/../
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../seeta/
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include/
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../include/seeta/
LOCAL_C_INCLUDES += $(LOCAL_PATH)/../src/


LOCAL_LDFLAGS += -L$(LOCAL_PATH)/lib -fuse-ld=bfd

LOCAL_LDLIBS += -llog -lz

LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog 
LOCAL_LDLIBS += -landroid

LOCAL_CFLAGS += -mfpu=neon-vfpv4 -funsafe-math-optimizations -ftree-vectorize  -ffast-math

LOCAL_SHARED_LIBRARIES += seetanet-prebuilt
LOCAL_SHARED_LIBRARIES += facedetector-prebuilt
LOCAL_SHARED_LIBRARIES += facerecognizer-prebuilt
LOCAL_SHARED_LIBRARIES += facelandmarker-prebuilt
#LOCAL_SHARED_LIBRARIES += qualityassessor-prebuilt

include $(BUILD_SHARED_LIBRARY)
